package com.tchy.cloud.tools;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by chenghao on 2015/3/20.
 */
public class DateUtil {
    /**
     * 获取当前日期
     * @return
     */
    public static String getCurrentDate() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
        return sdf.format(new Date());
    }

    public static void main(String[] s){
        System.out.println(getCurrentDate());
    }
}
